import java.util.Scanner;

    public class MyDoc {
        static Document d;
        public static void main(String[] args) {
            String chooseInt = "Int";
            String chooseDouble = "Double";
            d = new Document(chooseInt);
            d.displayData();
            d = new Document(chooseDouble);
            d.displayData();
        }
    }

    abstract class Data{
        public abstract void displayvalue();
    }

    class Document {
        Data pd;
        Document(String choice) {
            if (choice.equalsIgnoreCase("Int")){
                pd = new Integer();
            }
            if (choice.equalsIgnoreCase("Double")){
                pd = new Double();
            }
        }
        public void displayData(){
            pd.displayvalue();
        }
    }

    class Double extends Data{
        double value;
        Double() {
            value=5.0;
        }

        @Override
        public void displayvalue() {
            System.out.println(value);
        }
    }

     class Integer extends Data{
        int value;
        Integer(){
            value=100;
        }

        @Override
        public void displayvalue() {
            System.out.println(value);
        }


}
